<%- include('header') -%>
  <div id="result">
    <button id="logout" class='mui-btn mui-btn--raised mui-btn--primary'>登出</button> 
  </div>

  <div id="main">
    <table class="mui-table mui-table--bordered">
      <thead>
        <tr>
          <th>姓名</th>
          <th>性别</th>
          <th>年级</th>
          <th>地区</th>
          <th>学部</th>
          <th>手机号</th>
          <th>邮箱</th>
          <th>报名日期</th>
          <th>是否缴费</th>
          <th>删除</th>
          <th>确认缴费</th>
        </tr>
      </thead>
      <tbody>
        <% if(applicants.length) {%>
          <% for(var i=0;i<applicants.length;i++){ %>
            <tr>
              <td class='name'><%= applicants[i]['name'] %></td>
              <td><%= applicants[i]['sex'] %></td>
              <td><%= applicants[i]['grade'] %></td>
              <td><%= applicants[i]['area'] %></td>
              <td><%= applicants[i]['department'] %></td>
              <td class='phone'><%= applicants[i]['phone'] %></td>
              <td><%= applicants[i]['email'] %></td>
              <td><%= applicants[i]['time'] %></td>
              <td class='pay'><%= applicants[i]['isPayed'] %></td>
              <td><button onclick='deleteF(this)' class='mui-btn mui-btn--raised mui-btn--primary'>删除</button></td>
              <td><button onclick='pay(this)' class='mui-btn mui-btn--raised mui-btn--primary'>缴费</button></td>
            </tr>
          <% } %>
        <% } %>
      </tbody>
    </table>
    <button id='excel' class="mui-btn mui-btn--raised mui-btn--primary"><a href="/excel" target='_blank'>下载excel表格</a></button>
  </div>
  <div id="prompt-outer">
    <div id="delete-p" class="prompt">
      <div class="prompt-text">确定要删除？</div>
      <div class="prompt-btns">
        <button id="d-con" class="confirm mui-btn mui-btn--raised mui-btn--danger">确定</button>
        <button id="d-can" class="cancel mui-btn mui-btn--raised mui-btn--accent">取消</button>
      </div>
    </div>
    <div id="pay-p" class="prompt">
      <div class="prompt-text">确定要设置为已缴费？</div>
      <div class="prompt-btns">
        <button id="p-con" class="confirm mui-btn mui-btn--raised mui-btn--danger">确定</button>
        <button id="p-can" class="cancel mui-btn mui-btn--raised mui-btn--accent">取消</button>
      </div>
    </div>
  </div>
  <script src='/js/manage.js'></script>
<%- include('footer') -%>